<?php

namespace App\Transformers\Clbum;

use League\Fractal\TransformerAbstract;
use App\Models\Clbum\Grade;

class GradeTransformer extends TransformerAbstract
{

    public function transform(Grade $model)
    {
        return [
            'id'         => (int) $model->id,
            'name' => $model->name,
            'entrance_date' => $model->entrance_date,
            'graduate_date' => $model->graduate_date,
            'clbum_cnt' => $model->clbum_cnt,
            'leader_user_id' => $model->leader_user_id,
            'leader_name' => $model->leader_name,
            'desc' => $model->desc,
            'created_user' => $model->created_user,
            'updated_user' => $model->updated_user,
            'created_at' => $model->created_at->format('Y-m-d H:i:s')
        ];
    }
}
